<%@ Page Language="C#" MasterPageFile="~/master/public-regular.master" AutoEventWireup="true"
    CodeFile="order-status.aspx.cs" Inherits="myaccount_order_status" %>

<%@ Register Src="~/controls/wucEmptyGridMessage.ascx" TagName="EmptyGridMessage"
    TagPrefix="wuc" %>
<%@ Register Namespace="ECommerce.Library.Web" TagPrefix="ucc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderNestedHeader"
    runat="Server">
    <link href="<%= SiteGlobals.BaseUrl %>App_Style/css/admin.css" rel="stylesheet" type="text/css" />
    <link href="<%= SiteGlobals.BaseUrl %>App_Style/css/admin.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="cntContent" ContentPlaceHolderID="cphMiddleContent" runat="Server">
    <div class="right-content">
        <table width="78%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td align="center">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <asp:GridView ID="grvProductPurchaseOrder" runat="server" AllowPaging="false" AllowSorting="false"
                                    AutoGenerateColumns="false" PageSize="50" GridLines="none" CellPadding="7" CellSpacing="0"
                                    Width="100%" OnRowDataBound="ProductPurchaseOrder_RowDataBound">
                                    <AlternatingRowStyle CssClass="AlternatingRowStyle" />
                                    <FooterStyle CssClass="FooterStyle" />
                                    <HeaderStyle CssClass="HeaderStyle" />
                                    <PagerStyle CssClass="PagerStyle" />
                                    <RowStyle CssClass="RowStyle" />
                                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                                    <%--                                        <SortedAscendingHeaderStyle CssClass="sortasc-header" />
                                        <SortedDescendingHeaderStyle CssClass="sortdesc-header" />
                                        <SortedAscendingCellStyle CssClass="sortasc-row" />
                                        <SortedDescendingCellStyle CssClass="sortdesc-row" />--%>
                                    <Columns>
                                        <asp:TemplateField>
                                            <HeaderStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridHeader reorderHeader " />
                                            <ItemStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridRow" />
                                            <HeaderTemplate>
                                                <table>
                                                    <tr>
                                                        <td rowspan="2" valign="middle" style="font-weight: bold">
                                                            Order #
                                                        </td>
                                                        <td>
                                                            <asp:ImageButton ID="imbOrderCodeSortUp" runat="server" ImageUrl="~/images/admin/sort-down.png"
                                                                OnCommand="Grid_Sort" CommandName="sort" CommandArgument="CreateDate Asc" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:ImageButton ID="imbOrderCodeSortDown" runat="server" ImageUrl="~/images/admin/sort-up.png"
                                                                OnCommand="Grid_Sort" CommandName="sort" CommandArgument="CreateDate Asc" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lkbOrderCode" runat="server" Text='<%# Eval("OrderNumber") %>'
                                                    CssClass="leftlink reordertext" CommandArgument='<%# Eval("OrderNumber") %>'
                                                    CommandName="edit_link" OnCommand="NavigateToEditPage" Style="color: #B36F1F"></asp:LinkButton>
                                                <asp:HiddenField ID="hdfProductPurchaseOrderId" runat="server" Value='<%# Eval("OrderId") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <HeaderStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridHeader reorderHeader" />
                                            <ItemStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridRow" />
                                            <HeaderTemplate>
                                                <table>
                                                    <td rowspan="2" valign="middle" style="font-weight: bold">
                                                        Date:
                                                    </td>
                                                    <td>
                                                        <asp:ImageButton ID="imbCreateDateSortUp" runat="server" ImageUrl="~/images/admin/sort-down.png"
                                                            OnCommand="Grid_Sort" CommandName="sort" CommandArgument="CreateDate Asc" />
                                                    </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:ImageButton ID="imbCreateDateSortDown" runat="server" ImageUrl="~/images/admin/sort-up.png"
                                                                OnCommand="Grid_Sort" CommandName="sort" CommandArgument="CreateDate Asc" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblCreateDate" runat="server" Text='<%# ECommerce.Library.ECommerce.Utility.FormatDateTime(DateTime.Parse(Eval("OrderDate").ToString()))%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <HeaderStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridHeader reorderHeader" />
                                            <ItemStyle Width="20%" HorizontalAlign="right" VerticalAlign="Top" CssClass="gridRow" />
                                            <HeaderTemplate>
                                                Total Price
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblTotalPrice" runat="server" Text='<%# ECommerce.Library.ECommerce.Utility.FormatPriceText(Convert.ToDouble(Eval("TotalAmount")))%>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <HeaderStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridHeader reorderHeader" />
                                            <ItemStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridRow" />
                                            <HeaderTemplate>
                                                Status
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblOrderStatus" runat="server" Text=""></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <HeaderStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridHeader reorderHeader" />
                                            <ItemStyle Width="20%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridRow" />
                                            <HeaderTemplate>
                                                Tracking No.
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblTrackingNo" runat="server" Text=""></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <HeaderStyle Width="15%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridHeader reorderHeader" />
                                            <ItemStyle Width="15%" HorizontalAlign="left" VerticalAlign="Top" CssClass="gridRow" />
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lkbReOrder" runat="server" Text="Re-Order" CssClass="btn-regular reordertext"
                                                    CommandArgument='<%# Eval("OrderNumber") %>' CommandName="re-order" OnCommand="NavigateToShoppingCart"></asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <EmptyDataRowStyle HorizontalAlign="center" />
                                    <EmptyDataTemplate>
                                        <wuc:EmptyGridMessage ID="EmptyGridMessage1" runat="server" MessageText="No Order Found">
                                        </wuc:EmptyGridMessage>
                                    </EmptyDataTemplate>
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding: 2px" style="border: 1px solid #EFE9E0;">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td height="30" align="center" bgcolor="#EFE9E0" style="padding: 0 10px" colspan="2">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="50%" align="left" class="plnk">
                                                        Displaying
                                                        <asp:Label ID="lblFirstItemNumber" runat="server"></asp:Label>
                                                        to
                                                        <asp:Label ID="lblLastItemNumber" runat="server"></asp:Label>
                                                        (of
                                                        <asp:Label ID="lblTotalItem" runat="server"></asp:Label>
                                                        Orders)
                                                    </td>
                                                    <td width="50%" align="right" class="plnk">
                                                        Pages:
                                                        <asp:Repeater ID="rptPaging" runat="server">
                                                            <ItemTemplate>
                                                                <asp:LinkButton ID="hlkPage" runat="server" Text='<%# Container.DataItem %>' OnCommand="Paging_Command"
                                                                    CommandName="paging" CommandArgument='<%# Container.DataItem %>' CssClass="plnkinactive reordertext"
                                                                    Style="color: Black"></asp:LinkButton>
                                                            </ItemTemplate>
                                                            <SeparatorTemplate>
                                                                &nbsp;</SeparatorTemplate>
                                                            <FooterTemplate>
                                                                &nbsp;<asp:LinkButton ID="hlkAll" runat="server" Text="All" CommandName="paging"
                                                                    CommandArgument="All" OnCommand="Paging_Command" CssClass="plnkinactive reordertext"
                                                                    Style="color: BLack"></asp:LinkButton>
                                                            </FooterTemplate>
                                                        </asp:Repeater>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
